#include "print.h"

int next_num = 0;
int next_mode = 0;
int next_color = 0;

int next_x = 46;
int next_y = 8;

int init_x = 24;
int init_y = 6;

int dynamic_x = 0;
int dynamic_y = 0;

int dynamic_num = 0;
int dynamic_mode = 0;
int dynamic_color = 0;

// ���ö�ʱ��ʱ��
int ms = 800; // 0.8s

int score_x = 45;
int score_y = 18;
int level_x = 45;
int level_y = 24;

int score = 0;
int level = 0;

// 记录触底时方块位置
int matrix[24][28] = {0};

int shape[7][4][18] =
{
	{
		{1,1,0,0, 1,1,0,0, 0,0,0,0, 0,0,0,0, 2,2},
		{1,1,0,0, 1,1,0,0, 0,0,0,0, 0,0,0,0, 2,2},
		{1,1,0,0, 1,1,0,0, 0,0,0,0, 0,0,0,0, 2,2},
		{1,1,0,0, 1,1,0,0, 0,0,0,0, 0,0,0,0, 2,2}
	},
	{
		{1,0,0,0, 1,0,0,0, 1,0,0,0, 1,0,0,0, 3,0},
		{1,1,1,1, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,3},
		{1,0,0,0, 1,0,0,0, 1,0,0,0, 1,0,0,0, 3,0},
		{1,1,1,1, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,3}
	},
	{
		{0,1,0,0, 1,1,1,0, 0,0,0,0, 0,0,0,0, 1,2},
		{1,0,0,0, 1,1,0,0, 1,0,0,0, 0,0,0,0, 2,1},
		{1,1,1,0, 0,1,0,0, 0,0,0,0, 0,0,0,0, 1,2},
		{0,1,0,0, 1,1,0,0, 0,1,0,0, 0,0,0,0, 2,1}
	},
	{
		{1,1,0,0, 0,1,1,0, 0,0,0,0, 0,0,0,0, 1,2},
		{0,1,0,0, 1,1,0,0, 1,0,0,0, 0,0,0,0, 2,1},
		{1,1,0,0, 0,1,1,0, 0,0,0,0, 0,0,0,0, 1,2},
		{0,1,0,0, 1,1,0,0, 1,0,0,0, 0,0,0,0, 2,1}
	},
	{
		{0,1,1,0, 1,1,0,0, 0,0,0,0, 0,0,0,0, 1,2},
		{1,0,0,0, 1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